<template>
  <div class="list">
    <div class="list-item" v-for="(item, index) in list" :key="index">
      <div style="text-align: left;">
        <div class="name">
          {{ item.type_name }}
        </div>
        <div class="time">
          {{ item.created_at }}
        </div>
      </div>
      <div style="color:red;">
        {{ item.amount }}
      </div>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  props: {},
  data() {
    return {
      list: {}
    };
  },
  activated() {
    this.getData();
  },
  methods: {
    getData() {
      $http
        .get(
          "Yingguang.butie_log",
          {
            uid: localStorage.getItem("uid")
          },
          "..."
        )
        .then(res => {
          this.list = res.data;
          console.log(res, "成没成功");
        });
    }
  }
};
</script>
<style>
.list {
  width: 100%;
  height: 200px;
}

.list-item {
  width: 92%;
  height: 80px;
  border-bottom: 1px solid #e0dfdf;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.time {
  margin-top: 7px;
  color: #8c8c8c;
  font-size: 14px;
}
</style>
